'use strict'

let DEBUG = process.env.DEBUG
const { app } = require('electron')
// 初始化 @electron/remote，使渲染进程可访问部分主进程 API
require('@electron/remote/main').initialize()
app.commandLine.appendSwitch('js-flags', '--expose_gc')

/*
const crashReporter = require('electron').crashReporter

crashReporter.start({
  productName: 'YourName',
  companyName: 'YourCompany',
  submitURL: 'https://your-domain.com/url-to-submit',
  autoSubmit: true
})
*/

app.on('window-all-closed', function() {
  if (process.platform != 'darwin') {
    app.quit()
  }
})

app.on('ready', function() {
  require('./js/start')()
})